package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ActivityApplyMapper;
import com.ruoyi.system.domain.ActivityApply;
import com.ruoyi.system.service.IActivityApplyService;

/**
 * 活动申请表Service业务层处理
 * 
 * @author 墨染
 * @date 2024-11-14
 */
@Service
public class ActivityApplyServiceImpl implements IActivityApplyService 
{
    @Autowired
    private ActivityApplyMapper activityApplyMapper;

    /**
     * 查询活动申请表
     * 
     * @param activityApplyId 活动申请表主键
     * @return 活动申请表
     */
    @Override
    public ActivityApply selectActivityApplyByActivityApplyId(Long activityApplyId)
    {
        return activityApplyMapper.selectActivityApplyByActivityApplyId(activityApplyId);
    }

    /**
     * 查询活动申请表列表
     * 
     * @param activityApply 活动申请表
     * @return 活动申请表
     */
    @Override
    public List<ActivityApply> selectActivityApplyList(ActivityApply activityApply)
    {
        return activityApplyMapper.selectActivityApplyList(activityApply);
    }

    /**
     * 新增活动申请表
     * 
     * @param activityApply 活动申请表
     * @return 结果
     */
    @Override
    public int insertActivityApply(ActivityApply activityApply)
    {
        activityApply.setCreateTime(DateUtils.getNowDate());
        return activityApplyMapper.insertActivityApply(activityApply);
    }

    /**
     * 修改活动申请表
     * 
     * @param activityApply 活动申请表
     * @return 结果
     */
    @Override
    public int updateActivityApply(ActivityApply activityApply)
    {
        activityApply.setUpdateTime(DateUtils.getNowDate());
        return activityApplyMapper.updateActivityApply(activityApply);
    }

    /**
     * 批量删除活动申请表
     * 
     * @param activityApplyIds 需要删除的活动申请表主键
     * @return 结果
     */
    @Override
    public int deleteActivityApplyByActivityApplyIds(Long[] activityApplyIds)
    {
        return activityApplyMapper.deleteActivityApplyByActivityApplyIds(activityApplyIds);
    }

    /**
     * 删除活动申请表信息
     * 
     * @param activityApplyId 活动申请表主键
     * @return 结果
     */
    @Override
    public int deleteActivityApplyByActivityApplyId(Long activityApplyId)
    {
        return activityApplyMapper.deleteActivityApplyByActivityApplyId(activityApplyId);
    }
}
